<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Setting extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'title',
        'name',
        'value',
        'group',
        'type',
        'addon_options',
        'sort',
        'description'
    ];

    protected function setNameAttribute ($attribute)
    {
        $this->attributes['name'] = strtolower($attribute);
    }
}
